home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1830 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  45 lines

  1. Path: zetnet.co.uk!demon!paralax.demon.co.uk
  2. From: maw@paralax.demon.co.uk (Michael Wiedmer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: sas c++ and standard libraries
  5. Date: Tue, 23 Jan 1996 22:56:34 GMT
  6. Message-ID: <913.6594T956T1110@paralax.demon.co.uk>
  7. References: <892.6593T765T2606@login.eunet.no>
  8. NNTP-Posting-Host: paralax.demon.co.uk
  9. X-NNTP-Posting-Host: paralax.demon.co.uk
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. >Hi!
  13.  
  14. >@strstr__FPCcPCc         File 'drvTGIF.o'
  15. >@strncpy__FPcPCcUi       File 'drvbase.o'
  16. >@strchr__FPCci           File 'lex.yy.o'
  17. >@__builtin_strcpy__FPcPCc File 'lex.yy.o'
  18. >@__builtin_strlen__FPCc  File 'lex.yy.o'
  19. >@__builtin_strcmp__FPCcPCc File 'drvFIG.o'
  20.  
  21. >They do look like standard string functions, but apparently the linker
  22. >can't find them. And setting param to stack doesn't seem to help.
  23.  
  24. C++ mangles all function names. So, in the file drvbase.(cxx|cpp|cc) you are
  25. calling the function strncpy(char*, const char*, unsigned int).
  26. If you had the C function prototype of strncpy() before this call then
  27. everything would work out fine.
  28.  
  29. So, make sure, there is a
  30. extern "C" strncpy(char*, const char*, unsigned int);
  31.  
  32.  
  33.  
  34. >It compiles fine with gcc though (and available on my homepage:
  35. This I don't understand - unless you are using different header files for gcc.
  36.  
  37.  
  38. hope this helps,
  39.  
  40.  
  41.       Michael
  42.  
  43.  
  44.  
  45.